package com.demo.service.sca.impl;

import com.demo.dao.common.entity.CatalogItem;
import com.demo.dao.sca.mapper.ScaDeviceVOMapper;
import com.demo.dao.sca.mapper.ScaPageTreeVOMapper;
import com.demo.dao.sca.mapper.ScaAllPageTreeVOMapper;
import com.demo.dao.sca.model.ScaPageTreeItemVO;
import com.demo.service.sca.ScaBasicVOService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ScaBasicVOServiceImpl implements ScaBasicVOService {
    @Autowired
    private ScaAllPageTreeVOMapper allPageTreeVOMapper;

    @Autowired
    private ScaPageTreeVOMapper pageTreeVOMapper;

    @Autowired
    ScaDeviceVOMapper deviceVOMapper;

    //******************************************************************
    // 项目树查询
    //******************************************************************
    //查询项目页面树
    @Override
    public List<ScaPageTreeItemVO> getAllPageVOTree()
    {
        return allPageTreeVOMapper.getAllPageVOTree();
    }

    //查询某个项目页面树
    @Override
    public List<ScaPageTreeItemVO> getPageVOTreeByProjectId(Long projectId) {
        return pageTreeVOMapper.getPageVOTreeByProjectId(projectId);
    }


    //设备目录列表
    @Override
    public List<CatalogItem> getDeviceListByProjectId(Long projectId) {
        return deviceVOMapper.getDeviceListByProjectId(projectId);
    }
}
